package com.flyduck.system.vo.dictData.trans;


import cn.hutool.core.bean.BeanUtil;
import com.flyduck.system.entity.SysDictDataEntity;
import com.flyduck.system.vo.dictData.DictOptionVO;
import com.google.common.base.Function;


/**
 * @program: flyduck-platform
 * @description:
 * @author: flyduck
 * @create: 2021-02-01 12:42
 **/
public class SysDictDataEntityToDictOptionVO implements Function<SysDictDataEntity, DictOptionVO> {

    @Override
    public DictOptionVO apply(SysDictDataEntity entity) {
        DictOptionVO dictOptionVO = new DictOptionVO();
        BeanUtil.copyProperties(entity,dictOptionVO);
        dictOptionVO.setSort(String.valueOf(entity.getSort()));
        return dictOptionVO;
    }
}
